Skip to content

New: React-based admin UI with REST API - #236

Merged
KingYes merged 8 commits into
masterfrom
new/react-admin-ui
Sep 1, 2026
Merged

New: React-based admin UI with REST API#236
KingYes merged 8 commits into
masterfrom
new/react-admin-ui

Conversation

@KingYes

@KingYes KingYes commented Aug 25, 2026

Copy link
Copy Markdown
Member

✨ PR Description

1. Problem & Context

Replacing legacy PHP-based admin UI (WP_List_Table) with React frontend + REST API backend. Enables modern, maintainable UI with proper separation of concerns and client-side filtering/pagination.

2. What Changed (Where)

  • PHP Backend: New AAL_Log_Query (query builder + filtering), AAL_Log_Presenter (data formatting), AAL_REST (REST endpoints /logs, /logs/filters, /promotions/{id}/dismiss)
  • Admin UI: class-aal-admin-ui.php now enqueues React app, removed list table instantiation
  • Export Logic: Refactored to use AAL_Log_Query and AAL_Log_Presenter::to_export_row()
  • Frontend: New React app (app.js, api.js, index.js) with filtering, search, pagination, promotions
  • Build Config: Added webpack/babel, npm scripts for build/start, GitHub Actions CI updates (checkout@v5)
  • Tests: New test-dateshow-query.php, updated test-export.php to use AAL_Log_Presenter

3. How It Works

User loads admin page → React app mounts to #aal-admin-root → fetches /logs/filters for dropdown options and /logs?page=1&...filters via REST → AAL_Log_Query::query() applies role-based WHERE clauses, pagination, sorting → results passed through AAL_Log_Presenter::to_json() for structured output → React renders table with inline promotions, filter links, export button synced to URL state.

4. Risks

Missing build artifacts: Dev must run npm run build before deployment or admin page shows error notice. Mitigate: add build step to release workflow (already done at line 97-98).

Permission model unchanged: REST endpoints reuse existing capability checks (view_all_aryo_activity_log, edit_pages), no new auth vuln but verify role-based filtering logic in AAL_Log_Query::get_where_by_role() remains correct across all object types.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

@wiz-9a149474ff

wiz-9a149474ff Bot commented Aug 25, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 High 1 Low
Software Management Finding Software Management Findings -
Total 1 High 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

Comment thread classes/class-aal-log-query.php
@KingYes
KingYes merged commit 0a17919 into master Sep 1, 2026
55 checks passed
@KingYes
KingYes deleted the new/react-admin-ui branch September 1, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant